import request from '@/utils/request'

// 查询商品规格列表
export function listDetail(query) {
  return request({
    url: '/shopping/detail/list',
    method: 'get',
    params: query
  })
}

// 查询商品规格详细
export function getDetail(detailId) {
  return request({
    url: '/shopping/detail/' + detailId,
    method: 'get'
  })
}

// 查询商品规格详细
export function getGoodsDetail(goodsId) {
  return request({
    url: '/shopping/detail/',
    method: 'post',
    data: {"goodsId": goodsId }
  })
}

// 新增商品规格
export function addDetail(data) {
  return request({
    url: '/shopping/detail',
    method: 'post',
    data: data
  })
}

// 修改商品规格
export function updateDetail(data) {
  return request({
    url: '/shopping/detail',
    method: 'put',
    data: data
  })
}

// 删除商品规格
export function delDetail(detailId) {
  return request({
    url: '/shopping/detail/' + detailId,
    method: 'delete'
  })
}
